package com.oasystem.enums;

public enum EApproveStatus {
	APPROVED("A", "批准"), DENY("D", "拒绝"),IN_PROGRESS("I", "处理中"), NA(null, null);

	private String code;
	private String status;

	private EApproveStatus(String code, String status) {
		this.code = code;
		this.status = status;
	}

	public static EApproveStatus getByStatus(String status) {
		if ("A".equals(status)) {
			return EApproveStatus.APPROVED;
		}else if ("I".equals(status)) {
			return EApproveStatus.IN_PROGRESS;
		}else if ("D".equals(status)) {
			return EApproveStatus.DENY;
		} else {
			return EApproveStatus.NA;
		}
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
